import { get } from 'lodash-es'

export class SmsLog {
  id?: string
  hotel_id?: string
  sequence?: string
  mobile?: string
  confirm_number?: string
  url_id?: string
  sign_name?: string
  sms_code?: string
  content?: string
  template_param?: string
  status?: string
  result?: string
  user_id?: string
  order_by?: number
  created_at?: string
  updated_at?: string
  version?: number;

  [key: string]: any

  constructor(data?: SmsLog) {
    this.init(data)
  }
}

SmsLog.prototype.init = function init(data?: SmsLog) {
  this.id = get(data, 'id')
  this.hotel_id = get(data, 'hotel_id')
  this.sequence = get(data, 'sequence')
  this.mobile = get(data, 'mobile')
  this.confirm_number = get(data, 'confirm_number')
  this.url_id = get(data, 'url_id')
  this.sign_name = get(data, 'sign_name')
  this.sms_code = get(data, 'sms_code')
  this.content = get(data, 'content')
  this.template_param = get(data, 'template_param')
  this.status = get(data, 'status')
  this.result = get(data, 'result')
  this.user_id = get(data, 'user_id')
  this.order_by = get(data, 'order_by')
  this.created_at = get(data, 'created_at')
  this.updated_at = get(data, 'updated_id')
  this.version = get(data, 'version')
}
